Next: How to Debug Tests, Previous: How to Run Tests, Up: Top [Contents]
ERT lets you define tests in the same way you define
functions. You can type ert-deftest forms in a
buffer and evaluate them there with eval-defun or
compile-defun, or you can save the file and load it,
optionally byte-compiling it first.
Just like find-function is only able to find
where a function was defined if the function was loaded from a
file, ERT is only able to find where a test was defined if the
test was loaded from a file.
• The
should Macro: |
A powerful way to express assertions. | |
| • Expected Failures: | Tests for known bugs. | |
| • Tests and Their Environment: | Don’t depend on customizations; no side effects. | |
| • Useful Techniques: | Some examples. |